package com.fourpigeon.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface SyncTableDao {
    @Update("update tb_user u join tb_blog_junior j on u.id = j.userId set j.icon = u.icon,j.userName = u.name where u.id = #{id}")
    public boolean updateJunior(Long id);

    @Update("update tb_user u join tb_blog_advanced a on u.id = a.userId set a.icon = u.icon,a.userName = u.name where u.id = #{id}")
    public boolean updateAdvanced(Long id);

    @Update("update tb_user u join tb_blog_senior s on u.id = s.userId set s.icon = u.icon,s.userName = u.name where u.id = #{id}")
    public boolean updateSenior(Long id);

    @Update("update tb_user u join tb_blog_practice p on u.id = p.userId set p.icon = u.icon,p.userName = u.name where u.id = #{id}")
    public boolean updatePractice(Long id);

    @Update("update tb_user u join tb_blog_deal d on u.id = d.userId set d.icon = u.icon,d.userName = u.name where u.id = #{id}")
    public boolean updateDeal(Long id);

    @Update("update tb_user u join tb_blog_daily d on u.id = d.userId set d.icon = u.icon,d.userName = u.name where u.id = #{id}")
    public boolean updateDaily(Long id);
}
